FROM {{ namespace }}/{{ image_prefix }}placement-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block placement_api_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}
    {% if base_package_type == 'rpm' %}

        {% set placement_api_packages = [
            'openstack-placement-api'
        ] %}

{{ macros.install_packages(placement_api_packages | customizable("packages")) }}

    {% elif base_package_type == 'deb' %}

        {% set placement_api_packages = [
            'placement-api'
        ] %}

{{ macros.install_packages(placement_api_packages | customizable("packages")) }}
RUN rm -f /etc/apache2/sites-enabled/placement-api.conf

    {% endif %}
{% elif install_type == 'source' %}

    {% set placement_api_packages = [
    ] %}
{{ macros.install_packages(placement_api_packages | customizable("packages")) }}
{% endif %}

COPY extend_start.sh /usr/local/bin/kolla_placement_extend_start

{% block placement_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
